home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
007
/
asmexam.arc
/
MEMSIZE.LST
< prev
next >
Wrap
File List
|
1984-07-02
|
3KB
|
72 lines
The IBM Personal Computer Assembler 07-02-84 PAGE 1-1
MEMSIZE - reset PC/DOS memory size variable
1 name memsize
2 page 55,132
3 title MEMSIZE - reset PC/DOS memory size variable
4 ; for IBM PC memsize variable at location 40:13h
5 ; is # of K bytes see technical reference p A-2
6 ;
7 ; for TI PC memsize variable at 0:0198h
8 ; is # of paragraphs ie 16 byte blocks see technical
9 ; reference p 3-6
10 ;
11 0000 cseg segment byte
12 assume cs:cseg,ds:cseg
13 0100 org 100h
14 0100 BB 0040 start: mov bx,40h ; for TI PC make this 00h
15 0103 8E DB mov ds,bx
16 0105 BB 0013 mov bx,013h ; for TI PC make this 0198h
17 0108 8B 07 mov ax,[bx]
18 010A 81 3F 0220 cmp word ptr [bx],220h ; for TI PC change 220h to 8800h
19 010E 7C 28 jl exit1
20
21 0110 B8 8800 mov ax,8800h
22 0113 BB 0000 mov bx,0
23 0116 3D A000 loop1: cmp ax,0a000h ; for TIPC change 0a000h to 0c000h
24 0119 74 0F je exit2
25 011B 8E D8 mov ds,ax
26 011D 89 07 mov [bx],ax
27 011F 8B 0F mov cx,[bx]
28 0121 3B C1 cmp ax,cx
29 0123 75 05 jne exit2
30 0125 8C D8 mov ax,ds
31 0127 40 inc ax
32 0128 EB EC jmp loop1
33
34 012A exit2:
35 012A B1 06 mov cl,6 ; for TI PC delete this line
36 012C D3 E8 shr ax,cl ; and delete this line
37 012E BB 0040 mov bx,40h ; for TI PC change 40h to 00h
38 0131 8E DB mov ds,bx
39 0133 BB 0013 mov bx,013h ; for TI PC chance 013h to 0198h
40 0136 89 07 mov [bx],ax
41 0138 CD 20 exit1: int 20h
42 013A cseg ends
43
44 end start
The IBM Personal Computer Assembler 07-02-84 PAGE Symbols-1
MEMSIZE - reset PC/DOS memory size variable
Segments and groups:
N a m e Size align combine class
CSEG . . . . . . . . . . . . . . 013A BYTE NONE
Symbols:
N a m e Type Value Attr
EXIT1. . . . . . . . . . . . . . L NEAR 0138 CSEG
EXIT2. . . . . . . . . . . . . . L NEAR 012A CSEG
LOOP1. . . . . . . . . . . . . . L NEAR 0116 CSEG
START. . . . . . . . . . . . . . L NEAR 0100 CSEG
Warning Severe
Errors Errors
0 0